<script setup lang="ts">
import { Toaster } from '@/components/ui/sonner'
import { onMounted } from 'vue'
import 'vue-sonner/style.css' // vue-sonner v2 requires this import
import { login } from '@/api/user'

onMounted(() => {
  login({ username: 'admin', password: '111111' })
})
</script>

<template>
  <Toaster position="top-center" />
  <h1>HI</h1>
  dev/prod/test
</template>

<style scoped>
.logo {
  height: 6em;
  padding: 1.5em;
  will-change: filter;
  transition: filter 300ms;
}

.logo:hover {
  filter: drop-shadow(0 0 2em #646cffaa);
}

.logo.vue:hover {
  filter: drop-shadow(0 0 2em #42b883aa);
}

.container {
  margin-left: 100px;
}

.router-items {
  display: flex;
  gap: 1em;
  justify-content: center;
  align-items: center;
}

.router-item {
  cursor: pointer;
  position: relative;
}

.router-item::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -10px;
  height: 3px;
  width: 0;
  background-color: #42b883;
  transition: width 300ms ease-in-out;
}

.router-item.active::after {
  width: 100%;
  /* 激活时显示完整下划线 */
}
</style>
